package com.zjhd.sealcutting.dao;

import com.zjhd.sealcutting.domain.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserInfoMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKey(UserInfo record);

    int updateByPrimaryKeySelective(UserInfo record);

    UserInfo queryByMobile(@Param("mobile")String mobile);

    List<UserInfo> queryParamUserList(Map<String, Object> map);

    long queryParamUserListCount(Map<String, Object> map);

    boolean updateByIdState(@Param("id")Integer id,@Param("state")Integer state);

    UserInfo queryByMobileUserInfo(@Param("mobile")String mobile);

    boolean updateByIdPortrait(Map<String, Object> map);

    boolean updateByIdUserInfo(UserInfo record);

    int queryByMobileCount(@Param("mobile")String mobile);

    List<String> queryGroupByCompany();

    List<UserInfo> queryByCompanyUser(@Param("company")String company);

    /**
     * TODO 查询所有启用用户
     * @author wangchao
     * @date 2020/12/16 9:57
     * @param
     * @return
     */
    List<UserInfo> queryAllUser();
}